package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.bean.MarketBrandExample;
import com.cskaoyan.bean.chenfeng.vo.BrandListVo;
import com.cskaoyan.bean.leihao.bo.BrandListDTO;
import com.cskaoyan.bean.leihao.vo.CatAndBrandVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketBrandMapper {
    long countByExample(MarketBrandExample example);

    int deleteByExample(MarketBrandExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketBrand record);

    int insertSelective(MarketBrand record);

    List<MarketBrand> selectByExample(MarketBrandExample example);

    MarketBrand selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketBrand record, @Param("example") MarketBrandExample example);

    int updateByExample(@Param("record") MarketBrand record, @Param("example") MarketBrandExample example);

    int updateByPrimaryKeySelective(MarketBrand record);

    int updateByPrimaryKey(MarketBrand record);


    List<BrandListDTO> selectMarketBrandIdAndName();
    // 更新对应的品牌制造商信息
    Integer updateMarket(@Param("marketBrand") MarketBrand marketBrand);

    // 修改品牌制造商为不可见
    int invisibleBrand(@Param("marketBrand") MarketBrand marketBrand);

    // 查询品牌商是否存在
    Integer selectByBrandName(@Param("name") String name);

    List<com.cskaoyan.bean.leihao.vo.BrandListDTO> selectHomeIdex();

    MarketBrand selectBrandBySortOrder(Byte sortOrder);
    // 查询sortorder最大值
    List<MarketBrand> selectBrandWithMaxSortOrder();

    // 查询wx端需要的品牌列表
    List<BrandListVo> selectBrandListByPage();
}